#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import angle_speed_torque_state
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    angle_speed_torque = dr.angle_speed_torque_state(id_num=data.id_num, n=data.n)
    if angle_speed_torque is None:
        pass
    else:
        print(angle_speed_torque)
    rospy.loginfo("angle_speed_torque_state_node")


def listener():
    rospy.init_node("angle_speed_torque_state", anonymous=True)
    rospy.Subscriber("angle_speed_torque_state", angle_speed_torque_state, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

